package com.mathassistant.client.event.theory;

import com.google.gwt.event.shared.GwtEvent;
import com.mathassistant.shared.TopicDTO;

public class TheoryDeletedEvent extends GwtEvent<TheoryDeletedEventHandler>{
	public static final Type<TheoryDeletedEventHandler> TYPE = new Type<TheoryDeletedEventHandler>();
	private TopicDTO topic;
	private int indexBeginList;
	public TheoryDeletedEvent(TopicDTO topic, int indexBeginList){
		this.topic = topic;
		this.indexBeginList = indexBeginList;
	}
	
	public TopicDTO getTopic() {
		return topic;
	}

	public int getIndexBeginList() {
		return indexBeginList;
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<TheoryDeletedEventHandler> getAssociatedType() {
		// TODO Auto-generated method stub
		return TYPE;
	}

	@Override
	protected void dispatch(TheoryDeletedEventHandler handler) {
		// TODO Auto-generated method stub
		handler.onFinishedDelete(this);
	}

}
